#include<iostream>
#include<cstring>


class Student          // C++里 sturct 不写访问权限，的默认访问权限是pulic
{
    public:
        void SetID(int id)
        {
            m_id =id;
        }
        
        void SetName(const char*name)
        {
            strcpy(m_Name,name);
        }
        
        void Print()
        {
            std::cout<<m_id<<" "<<m_Name<<std::endl;
        }

    private:
         int m_id;      //(属性前面加个 m_   用来区分是本身的属性还是传进来的参数)
        char m_Name[20];
};







int main()
{
    Student s;

    s.SetID(10);
    s.SetName("zhangsan");
    s.Print();
    

    return 0;
}